﻿using log4net.Repository.Hierarchy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FreeAccessNetdisk.src.classes
{
    public delegate void LogEventHandler(LogType type, string message);
    
    public enum LogType
    {
        LOCAL,
        CLOUD,
        DASHBOARD,
    }

    public class UniversalLogger
    {
        private static UniversalLogger INSTANCE = new UniversalLogger();

        private UniversalLogger() { }

        public static UniversalLogger GetLogger() { return INSTANCE; }
        
        public event LogEventHandler LogEvent;

        public void Log(LogType type, string message) 
        {
            LogEvent?.Invoke(type, message);
        }
    }
}
